package give.mapreplay;

import give.replay.ReplayApplication;

import java.sql.SQLException;

/**
 * Created by IntelliJ IDEA.
 * User: koller
 * Date: Oct 18, 2009
 * Time: 8:43:03 PM
 * To change this template use File | Settings | File Templates.
 */
public class Main {
    public static void main(String[] args) throws SQLException {
        boolean tryToIntegrateWithMacOS = true;

        String configFile = "matchmaker-config.xml";

        for (int i = 0; i < args.length; i++) {
            if ("--no-macos-integration".equals(args[i])) {
                tryToIntegrateWithMacOS = false;
            } else {
                configFile = args[i];
            }
        }

        if (tryToIntegrateWithMacOS) {
            // MacOS integration
            System.setProperty("apple.laf.useScreenMenuBar", "true");
            System.setProperty("com.apple.mrj.application.apple.menu.about.name", "GIVE Map Replay");
        }

        ReplayApplication m = new ReplayApplication(configFile, new MapReplayWindow());
    }

}
